package o;

import android.net.Uri;
import android.os.Handler;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.source.ads.AdsMediaSource$b;
import java.io.IOException;
import o.alj.a;

public final class aij extends ahy implements a {
    private final int ʻ;
    @Nullable
    private alx ʼ;
    private long ʽ;
    private final Uri ˊ;
    private final alu ˋ;
    private final a ˎ;
    private final adw ˏ;
    private final String ॱ;
    private boolean ॱॱ;
    @Nullable
    private final Object ᐝ;

    public static final class c implements AdsMediaSource$b {
        private boolean ʼ;
        private int ʽ = 1048576;
        @Nullable
        private adw ˊ;
        @Nullable
        private String ˋ;
        @Nullable
        private Object ˎ;
        private alu ˏ = new alm();
        private final a ॱ;

        public /* synthetic */ aim ˊ(Uri uri) {
            return ॱ(uri);
        }

        public c(a aVar) {
            this.ॱ = aVar;
        }

        public aij ॱ(Uri uri) {
            this.ʼ = true;
            if (this.ˊ == null) {
                this.ˊ = new adu();
            }
            return new aij(uri, this.ॱ, this.ˊ, this.ˏ, this.ˋ, this.ʽ, this.ˎ);
        }

        @Deprecated
        public aij ˎ(Uri uri, @Nullable Handler handler, @Nullable ail o_ail) {
            aij ॱ = ॱ(uri);
            if (!(handler == null || o_ail == null)) {
                ॱ.ˏ(handler, o_ail);
            }
            return ॱ;
        }
    }

    private aij(Uri uri, a aVar, adw o_adw, alu o_alu, @Nullable String str, int i, @Nullable Object obj) {
        this.ˊ = uri;
        this.ˎ = aVar;
        this.ˏ = o_adw;
        this.ˋ = o_alu;
        this.ॱ = str;
        this.ʻ = i;
        this.ʽ = -9223372036854775807L;
        this.ᐝ = obj;
    }

    public void ॱ(@Nullable alx o_alx) {
        this.ʼ = o_alx;
        ˏ(this.ʽ, this.ॱॱ);
    }

    public void ॱ() throws IOException {
    }

    public aih ˊ(aim.a aVar, alc o_alc, long j) {
        alj ˎ = this.ˎ.ˎ();
        if (this.ʼ != null) {
            ˎ.ॱ(this.ʼ);
        }
        return new aie(this.ˊ, ˎ, this.ˏ.ˋ(), this.ˋ, ˏ(aVar), this, o_alc, this.ॱ, this.ʻ);
    }

    public void ॱ(aih o_aih) {
        ((aie) o_aih).ʽ();
    }

    public void ˎ() {
    }

    public void ॱ(long j, boolean z) {
        if (j == -9223372036854775807L) {
            j = this.ʽ;
        }
        if (this.ʽ != j || this.ॱॱ != z) {
            ˏ(j, z);
        }
    }

    private void ˏ(long j, boolean z) {
        this.ʽ = j;
        this.ॱॱ = z;
        ˏ(new aja(this.ʽ, this.ॱॱ, false, this.ᐝ), null);
    }
}
